package com.example.feignclients;

import com.example.entity.Category;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/*
 * @Author: hx
 * @CreateTime: 2022/3/7 17:16
 * @Description:
 * */
@FeignClient("API-CATEGORIES")
public interface CategoryClients {
    /**
     * 根据类型id查询
     * @param id
     * @return
     */
    @GetMapping("/categories/{id}")
    Category category(@PathVariable("id") Integer id);
}
